﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Guedes_Library;
using System.Data;

/// <summary>
/// Summary description for NoticiaModel
/// </summary>
public class SustentabilidadeModel : GuedesModel<sust>
{
    private EntityKey entityKey;

    public SustentabilidadeModel()
	{

	}

    public void Salvar(sust sust)
    {
        entityKey = new EntityKey("guedesEntities.sust", "ID", sust.ID);
        Save(sust, entityKey);
    }

    public List<sust> ListarNoticias()
    {
        return null;
    }

    public override void DoChanges(sust entity, sust novo)
    {
        entity.Dica = novo.Dica;
        entity.Titulo = novo.Titulo;
    }

    public override string GetTabela()
    {
        return "guedesEntities.sust";
    }

    public override string GetKeyTabela()
    {
        return "ID";
    }
}